package com.buaa.model.dto;

/**
 * Created by DELL on 2018/4/13.
 */
public class Normal {

    private double r;
    private double g;
    private double b;
    private String color;

    public void init(){
        r = Math.round(Math.random() * 160);
        g = Math.round(Math.random() * 160);
        b = Math.round(Math.random() * 160);
        double maxValue = Math.max(r,Math.max(g,b));
        if(maxValue == r){
            color = "red";
        }else if(maxValue == g){
            color = "green";
        }else {
            color = "blue";
        }

        //System.out.println(color);
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
